﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;

namespace Snowdreamist.Windows.Document
{
    public class ErrorDocumentObject : Control
    {
        static ErrorDocumentObject()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(ErrorDocumentObject), new FrameworkPropertyMetadata(typeof(ErrorDocumentObject)));
        }

        public Exception Error
        {
            get { return (Exception)GetValue(ErrorProperty); }
            set { SetValue(ErrorProperty, value); }
        }
        public static readonly DependencyProperty ErrorProperty =
            DependencyProperty.Register("Error", typeof(Exception), typeof(ErrorDocumentObject), new UIPropertyMetadata(null));

        public Type RelatedSourceElementType
        {
            get { return (Type)GetValue(RelatedSourceElementTypeProperty); }
            set { SetValue(RelatedSourceElementTypeProperty, value); }
        }
        public static readonly DependencyProperty RelatedSourceElementTypeProperty =
            DependencyProperty.Register("RelatedSourceElementType", typeof(Type), typeof(ErrorDocumentObject), new UIPropertyMetadata(null));
    }
}
